//-----------------------------------------------------------------------------
//	File: rotenc.c
//	Author: hsia
//		bsp of rotary encoder
//-----------------------------------------------------------------------------

#ifndef __ROTENC_H__
#define	__ROTENC_H__

#include "stm32f10x.h"

//-----------------------------------------------------------------------------
//	configure the rotary encoder gpio
//-----------------------------------------------------------------------------
void configure_rotenc_gpio(void);

//-----------------------------------------------------------------------------
//	rotenc_key_scan - scan rotary key
//		@ret: 0=none, 1=short, 2=long
//-----------------------------------------------------------------------------
uint8_t rotenc_key_scan(void);

//-----------------------------------------------------------------------------
//	rotenc_scan - scan the rotary encoder and return value
//		@ret: 0x00=none, 0x01=add, 0xFF=sub
//-----------------------------------------------------------------------------
uint8_t rotenc_scan(void);

#endif
